package com.demo.modules.controller;

import com.demo.common.Res;
import com.demo.modules.dto.QueryDTO;
import com.demo.modules.entity.RiskArea;
import com.demo.modules.service.RiskAreaService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * (risk_area)风险地区表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("area")
public class RiskAreaController {

    /**
     * 服务对象
     */
    @Resource
    private RiskAreaService riskAreaService;

    /**
     * 查询风险地区数据
     *
     * @return 分页数据
     */
    @GetMapping("list")
    public Res<List<RiskArea>> selectList(QueryDTO dto) {
        List<RiskArea> list = riskAreaService.selectPage(dto);
        return Res.success(list);
    }

}
